package base;

import java.util.ArrayList;
import java.util.List;

/**
 * @Auther DRevelation
 * @Date 2020-05-14 下午 16:34
 * @Desc
 */
public class ArrayListDemo {
    public static void main(String[] args) {
        int oldCapacity = 11;
        int newCapacity = oldCapacity + (oldCapacity >> 1);
        System.out.println(newCapacity);

        List<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        System.out.println(list);
        System.out.println(list.size());

        list.add(2, "d");
        System.out.println(list);

        list.set(2, "e");
        System.out.println(list);

        System.out.println("10".hashCode());
    }
}
